<h2>DESCRIPTION</h2>

The input of this module is a single space time raster dataset, the
output is a single raster map layer. A subset of the input space time
raster dataset can be selected using the <b>where</b> option. The
sorting of the raster map layer can be set using the <b>order</b>
option. Be aware that the order of the maps can significantly influence
the result of the aggregation (e.g.: slope). By default the maps are
ordered by <b>start_time</b>.
<p>
<em>t.rast.series</em> is a simple wrapper for the raster module
<b>r.series</b>. It supports a subset of the aggregation methods of
<b>r.series</b>.

<h2>EXAMPLES</h2>

<h3>Estimate the average temperature for the whole time series</h3>

Here the entire stack of input maps is considered:

<div class="code"><pre>
t.rast.series input=tempmean_monthly output=tempmean_average method=average
</pre></div>

<h3>Estimate the average temperature for a subset of the time series</h3>

Here the stack of input maps is limited to a certain period of time:

<div class="code"><pre>
t.rast.series input=tempmean_daily output=tempmean_season method=average \
  where="start_time >= '2012-06' and start_time <= '2012-08'"
</pre></div>

<h3>Climatology: single month in a multi-annual time series</h3>

By considering only a single month in a multi-annual time series the so-called
climatology can be computed.

Estimate average temperature for all January maps in the time series:

<div class="code"><pre>
t.rast.series input=tempmean_monthly \
    method=average output=tempmean_january \
    where="strftime('%m', start_time)='01'"

# equivalently, we can use 
t.rast.series input=tempmean_monthly \
    output=tempmean_january method=average \
    where="start_time = datetime(start_time, 'start of year', '0 month')"

# if we want also February and March averages

t.rast.series input=tempmean_monthly \
    output=tempmean_february method=average \
    where="start_time = datetime(start_time, 'start of year', '1 month')"

t.rast.series input=tempmean_monthly \
    output=tempmean_march method=average \
    where="start_time = datetime(start_time, 'start of year', '2 month')"
</pre></div>

Generalizing a bit, we can estimate monthly climatologies for all months 
by means of different methods

<div class="code"><pre>
for i in `seq -w 1 12` ; do 
  for m in average stddev minimum maximum ; do 
    t.rast.series input=tempmean_monthly method=${m} output=tempmean_${m}_${i} \
    where="strftime('%m', start_time)='${i}'"
  done
done
</pre></div>

<h2>SEE ALSO</h2>

<em>
<a href="r.series.html">r.series</a>,
<a href="t.create.html">t.create</a>,
<a href="t.info.html">t.info</a>
</em>
<p>
<a href="https://grasswiki.osgeo.org/wiki/Temporal_data_processing">Temporal data processing Wiki</a>

<h2>AUTHOR</h2>

S&ouml;ren Gebbert, Th&uuml;nen Institute of Climate-Smart Agriculture

<!--
<p>
<i>Last changed: $Date$</i>
-->

